package com.yonyou.cyxdms.basedata.service.dto.dmsFeign;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonIgnore;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @author Simon
 */
@ApiModel(description = "返回结果")
public class ResponseDTO<T> implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "返回代码，0表示成功，其他表示失败")
    private String returnCode;

    @ApiModelProperty(value = "返回描述")
    private String returnMessage;

    @JsonIgnore
    @ApiModelProperty(value = "错误原因", hidden = true)
    private String cause;

    @ApiModelProperty(value = "返回数据")
    private T data;

    public String getReturnCode() {
        return returnCode;
    }

    public void setReturnCode(String returnCode) {
        this.returnCode = returnCode;
    }

    public String getReturnMessage() {
        return returnMessage;
    }

    public void setReturnMessage(String returnMessage) {
        this.returnMessage = returnMessage;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getCause() {
        return cause;
    }

    public void setCause(String cause) {
        this.cause = cause;
    }


    @Override
    public String toString() {
        return "ResponseDTO{" +
                "returnCode='" + returnCode + '\'' +
                ", returnMessage='" + returnMessage + '\'' +
                ", data=" + data +
                ", cause=" + cause +
                '}';
    }
}
